package com.xonro.common.histrans.zz.biz.base;

import com.actionsoft.bpms.commons.database.RowMap;
import com.actionsoft.sdk.local.SDK;
import com.xonro.common.histrans.base.ctx.HistoryTransContext;
import com.xonro.common.histrans.base.consts.DrpConst;
import com.xonro.common.histrans.zz.biz.common.DrpRecordTransBiz;
import com.xonro.common.histrans.zz.ctx.DrpProcessCreateContext;

import java.util.List;

public class BaseClassBiz extends DrpRecordTransBiz {
    @Override
    protected void transProcess0(DrpProcessCreateContext createContext) {

    }

    @Override
    protected String getDrpType() {
        return null;
    }

    @Override
    protected String getProcessDefId() {
        return "obj_d2ff75216f724b1d8e9cdbaa71483ab8";
    }

    @Override
    protected String getActivityDefId() {
        return null;
    }

    @Override
    protected String getTitle(HistoryTransContext ctx) {
        String billNo = ctx.getMainData().getString("BillNo");
        return "班组库Drp2.0数据同步"+billNo;
    }

    @Override
    protected String getEnCode(HistoryTransContext ctx) {
        RowMap mainData = ctx.getMainData();
        return mainData.getString("Wiid");
    }

    @Override
    protected String getOuterTable(DrpProcessCreateContext historyTransContext) {
        return "ct_laborteam";
    }

    @Override
    protected String getPk(DrpProcessCreateContext ctx) {
        RowMap mainData = ctx.getMainData();
        return mainData.getString("MyId");
    }

    @Override
    protected List<RowMap> getMainDatas() {
        return SDK.getCCAPI().getRDSAPI(DrpConst.ZZ_CCID).getMaps("SELECT * FROM ct_laborteam");
    }

    @Override
    protected RowMap getMainData() {
        return null;
    }
}
